
<div class="row">
  <div class="col-md-6 col-sm-8 col-sm-push-2">
    <form action="#" method="post" class="form form-horizontal" [formGroup]="roleForm">
        <div class="one-form-header"></div>
        <div class="one-form-body">
            <div class="form-group">
                <label for="create_role_roleName" class="col-sm-4 control-label">角色名:</label>
                <div class="col-sm-8">
                    <input type="hidden" id="roleId" formControlName="roleId" name="roleId">
                    <input type="text" class="form-control" id="create_role_roleName" name="roleName" required formControlName="roleName" >
                    <div *ngIf="formErrors.roleName" class="has-error">
                        <label class="control-label"><i class="fa fa-times-circle-o"></i>{{formErrors.roleName}} </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label for="creat_role_description" class="col-sm-4 control-label">描述:</label>
                <div class="col-sm-8">
                    <textarea rows="2" cols="20" id="creat_role_description" style="width:100%" name="description" formControlName="description" ></textarea>
                </div>
            </div>
        </div>
        <div class="one-form-footer">
            <div class="pull-right">
              <button class="btn btn-default" type="button" (click)="backPreviousStep()">上一步</button>
              <button class="btn btn-default" type="submit" [disabled]="!roleForm.valid"  (click)="onSubmit()">提交</button>
              <button class="btn btn-success" type="button"  (click)="authorizationForRole()" [disabled]="!roleForm.valid">角色授权</button>
            </div>
        </div>
    </form>
  </div>
</div>
